import request from '@/utils/request'

enum API {
  getBankList = '/agent/finance/bankList',
  bindPayment = '/agent/finance/bindPayment',
  getPaymentList = '/agent/finance/paymentList',
  WithdrawalAdd = '/agent/withdrawal/withdrawalApp',
  getWithdrawal = '/agent/withdrawal/index',
  EditPayment = '/agent/finance/paymentEdit',
  DeleteCode = '/agent/finance/del',
  CancelOrder = '/agent/withdrawal/cancel'
}

export function CancelOrderApi(data: any) {
  return request({ url: API.CancelOrder, method: 'post', data })
}

export function DeleteCodeApi(data: any) {
  return request({ url: API.DeleteCode, method: 'delete', data })
}

export function EditPaymentApi(data: any) {
  return request({ url: API.EditPayment, method: 'post', data })
}

export function GetWithdrawalApi(data: any) {
  return request({ url: API.getWithdrawal, method: 'post', data })
}

export function WithdrawalAddApi(data: any) {
  return request({ url: API.WithdrawalAdd, method: 'post', data })
}

export function GetPaymentListApi(data: any) {
  return request({ url: API.getPaymentList, method: 'post', data })
}

export function BindPaymentApi(data: any) {
  return request({ url: API.bindPayment, method: 'post', data })
}

export function GetBankListApi() {
  return request({ url: API.getBankList, method: 'post' })
}
